aboutsummaryrefslogtreecommitdiff
path: root/src/routes/grocery/[id]
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-09-12 22:24:19 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-09-12 22:24:19 +0200
commit5f0a73920034741236034ed7a721c68eceb8ab82 (patch)
treec5653093db0484e7474b9d69941666dfc308b083 /src/routes/grocery/[id]
parent1cef356be95a67f95d40f5b0b131f98d11f13c13 (diff)
Extract Row primitive, migrate all call sites
Variants card/ref/plain with scoped skin. Padding and wrap one-offs via style prop; draggable and handlers via rest spread. GroceryRow absorbs item-btn/ref-link globals with local names; BestRef scopes best-ref. Delete item-* globals and dead page overrides.
Diffstat (limited to 'src/routes/grocery/[id]')
-rw-r--r--src/routes/grocery/[id]/+page.svelte5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/routes/grocery/[id]/+page.svelte b/src/routes/grocery/[id]/+page.svelte
index 8a0a479..54134f0 100644
--- a/src/routes/grocery/[id]/+page.svelte
+++ b/src/routes/grocery/[id]/+page.svelte
@@ -1,6 +1,7 @@
<script lang="ts">
import { enhance } from '$app/forms';
import Button from '$lib/components/Button.svelte';
+ import Row from '$lib/components/Row.svelte';
let { data, form } = $props();
let name = $state('');
@@ -143,7 +144,7 @@
<form method="POST" action="?/delete" use:enhance>
<ul class="item-list item-list--wide">
{#each data?.references ?? [] as ref (ref.id)}
- <li class="item-row item-row--ref">
+ <Row variant="ref">
<div class="ref-info">
<strong>{ref.reference}</strong>
{#if ref.price}
@@ -158,7 +159,7 @@
<Button variant="ghost" name="id" value={ref.id} ariaLabel="Supprimer"
>&times;</Button
>
- </li>
+ </Row>
{/each}
</ul>
</form>